package com.iris.live.services.data.models;

import com.fasterxml.jackson.annotation.JsonProperty;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by xin on 2016/7/11.
 */
@SuppressWarnings("JpaDataSourceORMInspection")
@Entity
@Table(name = "LSH休假信息表", schema = "sg_lsh", catalog = "")
@IdClass(Lsh休假信息表ModelPK.class)
public class Lsh休假信息表Model {
    private String 销售顾问;
    private Date 休假日期;

    @Id
    @Column(name = "销售顾问")
    @JsonProperty("销售顾问")
    public String get销售顾问() {
        return 销售顾问;
    }

    public void set销售顾问(String 销售顾问) {
        this.销售顾问 = 销售顾问;
    }

    @Id
    @Column(name = "休假日期")
    @JsonProperty("休假日期")
    public Date get休假日期() {
        return 休假日期;
    }

    public void set休假日期(Date 休假日期) {
        this.休假日期 = 休假日期;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Lsh休假信息表Model that = (Lsh休假信息表Model) o;

        if (销售顾问 != null ? !销售顾问.equals(that.销售顾问) : that.销售顾问 != null) return false;
        if (休假日期 != null ? !休假日期.equals(that.休假日期) : that.休假日期 != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = 销售顾问 != null ? 销售顾问.hashCode() : 0;
        result = 31 * result + (休假日期 != null ? 休假日期.hashCode() : 0);
        return result;
    }
}
